diff options
| author | Adam Soltys <[email protected]> | 2023-11-30 16:44:58 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-30 16:44:58 -0800 |
| commit | 3c97ac12bdb8e201d75261e62a176f08d9cbdb1c (patch) | |
| tree | 70bd62644f0d86a45480a2b86ab7dc4a0aa2959c /src/routes/(app)/[username]/settings | |
| parent | 4972b423fe4f88bcef1b790b2287e2db3517b529 (diff) | |
| download | coinos-ui-3c97ac12bdb8e201d75261e62a176f08d9cbdb1c.tar.gz coinos-ui-3c97ac12bdb8e201d75261e62a176f08d9cbdb1c.zip | |
page transitions
Diffstat (limited to 'src/routes/(app)/[username]/settings')
| -rw-r--r-- | src/routes/(app)/[username]/settings/[...tab]/+page.svelte | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/src/routes/(app)/[username]/settings/[...tab]/+page.svelte b/src/routes/(app)/[username]/settings/[...tab]/+page.svelte index a3afce62..933fa1f6 100644 --- a/src/routes/(app)/[username]/settings/[...tab]/+page.svelte +++ b/src/routes/(app)/[username]/settings/[...tab]/+page.svelte @@ -121,6 +121,10 @@ } } + if (user.email !== prev.email) { + await post('/api/verify', { test: true }); + } + const response = await fetch(formElement.action, { method: 'POST', body: data @@ -156,20 +160,22 @@ <input type="hidden" name="pin" value={$pin} /> <div class="mt-24 mb-20 px-3 md:px-0 w-full md:w-[400px] mx-auto space-y-8"> - <h1 class="text-center text-3xl md:text-4xl font-semibold mb-10"> - {$t('user.settings.header')} - </h1> + <div class="header"> + <h1 class="text-center text-3xl md:text-4xl font-semibold mb-10"> + {$t('user.settings.header')} + </h1> - <div class="font-bold flex justify-around items-center border-b pb-3 text-secondary"> - {#each tabs.filter((t) => t.name !== 'shopify') as { name, key }} - <a href={`/${user.username}/settings/${name}`}> - <button - class="hover:opacity-80" - class:text-black={tab === name || (tab === 'shopify' && name === 'pos')} - >{$t(`user.settings.${key}`)}</button - > - </a> - {/each} + <div class="font-bold flex justify-around items-center border-b pb-3 text-secondary"> + {#each tabs.filter((t) => t.name !== 'shopify') as { name, key }} + <a href={`/${user.username}/settings/${name}`}> + <button + class="hover:opacity-80" + class:text-black={tab === name || (tab === 'shopify' && name === 'pos')} + >{$t(`user.settings.${key}`)}</button + > + </a> + {/each} + </div> </div> <svelte:component this={comp} {user} {rates} {submit} /> @@ -192,3 +198,9 @@ </button> </div> </form> + +<style> + .header { + view-transition-name: tabs; + } +</style> |
